package main.java.indi.zyj.sword;

public class TrainWays {

    public int trainWays(int num) {

        int a = 1, b = 1, sum;
        for(int i = 0; i < num; i++){
            sum = (a + b) % 1000000007;
            a = b;
            b = sum;
        }
        return a;

    }

}
